package com.yuanheng100.ems4j.api.model;

import com.yuanheng100.ems4j.api.model.bizstatus.EmployeeStatus;
import com.yuanheng100.ems4j.common.constant.Boolean;
import com.yuanheng100.ems4j.common.constant.Gender;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by j4love on 2016/12/13.
 * Description : 员工实体类
 */

@Table(name = "employee")
public class Employee implements Serializable {

    /** 员工Id,主键自增 */
    @Id
    @GeneratedValue(generator = "JDBC")
    private Integer empId;

    /** 员工姓名 */
    @Column(name = "empName")
    private String empName;

    /** 员工所在部门Id */
    @Column(name = "depId")
    private Integer depId;

    /**
     * 职位信息。dingding - 长度为0~64个字符 ; weixin - 长度为0~64个字节
     */
    @Column(name = "position")
    private String position;

    /**
     * 登录密码，MD5 32位
     */
    @Column(name = "password")
    private String password;

    /** 身份证号 */
    @Column(name = "idCardNo")
    private String idCardNo;

    /** 手机号码 */
    @Column(name = "mobile")
    private String mobile;

    /**
     * 邮箱。dingding - 长度为0~64个字符 ; weixin - 长度为0~64个字节。
     */
    @Column(name = "email")
    private String email;

    /** 性别 */
    @Column(name = "weixinGender")
    private Gender weixinGender;

    /** 入职日期 */
    @Column(name = "entryDate")
    private Date entryDate;

    /** 注销日期 */
    @Column(name = "deleteDate")
    private Date deleteDate;

    /** 员工状态 */
    @Column(name = "empStatus")
    private EmployeeStatus empStatus;

    /** 可以访问应用的Id集合 */
    @Column(name = "appIds")
    private String appIds;

    /** 微信Id */
    @Column(name = "weixinId")
    private String weixinId;

    /**
     * weixin - 成员头像的mediaid，通过多媒体接口上传图片获得的mediaid
     */
    @Column(name = "weixinAvatarMediaId")
    private String weixinAvatarMediaId;

    /**
     * weixin - 扩展属性。扩展属性需要在WEB管理端创建后才生效，否则忽略未知属性的赋值
     */
    @Column(name = "weixinExtattr")
    private String weixinExtattr;

    /**
     * dingding - 在对应的部门中的排序,
     * Map结构的json字符串,
     * key是部门的Id,
     * value是人员在这个部门的排序值
     */
    @Column(name = "dingOrderInDepts")
    private String dingOrderInDepts;

    /** dingding - 分机号，长度为0~50个字符 */
    @Column(name = "dingExtensionNumber")
    private String dingExtensionNumber;

    /** dingding - 办公地点，长度为0~50个字符 */
    @Column(name = "dingWorkPlace")
    private String dingWorkPlace;

    /** dingding - 备注 */
    @Column(name = "dingRemark")
    private String dingRemark;

    /** dingding - 员工工号。对应显示到OA后台和客户端个人资料的工号栏目。长度为0~64个字符 */
    @Column(name = "dingJobnumber")
    private String dingJobnumber;

    /**
     * dingding - 是否号码隐藏, true表示隐藏, false表示不隐藏。
     * 隐藏手机号后，手机号在个人资料页隐藏，但仍可对其发DING、发起钉钉免费商务电话。
     * */
    @Column(name = "dingIsHide")
    private Boolean dingIsHide;

    /**
     * dingding - 是否高管模式，true表示是，false表示不是。
     * 开启后，手机号码对所有员工隐藏。
     * 普通员工无法对其发DING、发起钉钉免费商务电话。高管之间不受影响。
     */
    @Column(name = "dingIsSenior")
    private Boolean dingIsSenior;

    /**
     * dingding - 扩展属性
     * 可以设置多种属性(但手机上最多只能显示10个扩展属性，
     * 具体显示哪些属性，请到OA管理后台->设置->通讯录信息设置和OA管理后台->设置->手机端显示信息设置)
     */
    @Column(name = "dingdingExtattr")
    private String dingdingExtattr;

    public Integer getEmpId() {
        return empId;
    }

    public void setEmpId(Integer empId) {
        this.empId = empId;
    }

    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }

    public Integer getDepId() {
        return depId;
    }

    public void setDepId(Integer depId) {
        this.depId = depId;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getIdCardNo() {
        return idCardNo;
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Gender getGender() {
        return weixinGender;
    }

    public void setGender(Gender weixinGender) {
        this.weixinGender = weixinGender;
    }

    public Date getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(Date entryDate) {
        this.entryDate = entryDate;
    }

    public Date getDeleteDate() {
        return deleteDate;
    }

    public void setDeleteDate(Date deleteDate) {
        this.deleteDate = deleteDate;
    }

    public EmployeeStatus getEmpStatus() {
        return empStatus;
    }

    public void setEmpStatus(EmployeeStatus empStatus) {
        this.empStatus = empStatus;
    }

    public String getAppIds() {
        return appIds;
    }

    public void setAppIds(String appIds) {
        this.appIds = appIds;
    }

    public Gender getWeixinGender() {
        return weixinGender;
    }

    public void setWeixinGender(Gender weixinGender) {
        this.weixinGender = weixinGender;
    }

    public String getWeixinId() {
        return weixinId;
    }

    public void setWeixinId(String weixinId) {
        this.weixinId = weixinId;
    }

    public String getWeixinAvatarMediaId() {
        return weixinAvatarMediaId;
    }

    public void setWeixinAvatarMediaId(String weixinAvatarMediaId) {
        this.weixinAvatarMediaId = weixinAvatarMediaId;
    }

    public String getWeixinExtattr() {
        return weixinExtattr;
    }

    public void setWeixinExtattr(String weixinExtattr) {
        this.weixinExtattr = weixinExtattr;
    }

    public String getDingOrderInDepts() {
        return dingOrderInDepts;
    }

    public void setDingOrderInDepts(String dingOrderInDepts) {
        this.dingOrderInDepts = dingOrderInDepts;
    }

    public String getDingExtensionNumber() {
        return dingExtensionNumber;
    }

    public void setDingExtensionNumber(String dingExtensionNumber) {
        this.dingExtensionNumber = dingExtensionNumber;
    }

    public String getDingWorkPlace() {
        return dingWorkPlace;
    }

    public void setDingWorkPlace(String dingWorkPlace) {
        this.dingWorkPlace = dingWorkPlace;
    }

    public String getDingRemark() {
        return dingRemark;
    }

    public void setDingRemark(String dingRemark) {
        this.dingRemark = dingRemark;
    }

    public String getDingJobnumber() {
        return dingJobnumber;
    }

    public void setDingJobnumber(String dingJobnumber) {
        this.dingJobnumber = dingJobnumber;
    }

    public Boolean getDingIsHide() {
        return dingIsHide;
    }

    public void setDingIsHide(Boolean dingIsHide) {
        this.dingIsHide = dingIsHide;
    }

    public Boolean getDingIsSenior() {
        return dingIsSenior;
    }

    public void setDingIsSenior(Boolean dingIsSenior) {
        this.dingIsSenior = dingIsSenior;
    }

    public String getDingdingExtattr() {
        return dingdingExtattr;
    }

    public void setDingdingExtattr(String dingdingExtattr) {
        this.dingdingExtattr = dingdingExtattr;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "dingdingExtattr='" + dingdingExtattr + '\'' +
                ", dingIsSenior=" + dingIsSenior +
                ", dingIsHide=" + dingIsHide +
                ", dingJobnumber='" + dingJobnumber + '\'' +
                ", dingRemark='" + dingRemark + '\'' +
                ", dingWorkPlace='" + dingWorkPlace + '\'' +
                ", dingExtensionNumber='" + dingExtensionNumber + '\'' +
                ", dingOrderInDepts='" + dingOrderInDepts + '\'' +
                ", weixinExtattr='" + weixinExtattr + '\'' +
                ", weixinAvatarMediaId='" + weixinAvatarMediaId + '\'' +
                ", weixinId='" + weixinId + '\'' +
                ", appIds='" + appIds + '\'' +
                ", empStatus=" + empStatus +
                ", deleteDate=" + deleteDate +
                ", entryDate=" + entryDate +
                ", weixinGender=" + weixinGender +
                ", email='" + email + '\'' +
                ", mobile='" + mobile + '\'' +
                ", idCardNo='" + idCardNo + '\'' +
                ", password='" + password + '\'' +
                ", position='" + position + '\'' +
                ", depId=" + depId +
                ", empName='" + empName + '\'' +
                ", empId=" + empId +
                '}';
    }
}

